<?php

class conexao {

    private $con;
    private $dsn = 'mysql:host=localhost;port=3307;dbname=proj_helios_v1';
    private $username = "root";
    private $password = "root";

    public function getConnection() {
        try {
            $this->con = new PDO($this->dsn, $this->username, $this->password, array(
                        PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
                        PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"
                    ));
            return $this->con;
        } catch (PDOException $exc) {

            echo "Erro na conexão " . $exc->getTraceAsString();
        }
    }

}

?>